{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "4d438669-f858-44ef-b36e-9ed84f09086a",
   "metadata": {},
   "source": [
    "# argmax"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "26f8f02f-7771-4286-9792-b1a6eb13fd18",
   "metadata": {},
   "source": [
    "$$\n",
    "\\begin{array}{ll}\n",
    "\\mathop{\\arg\\max}\\limits_{\\omega}  & \\frac{2}{||\\omega||} \\\\\n",
    "s.t. & y_i(\\omega^T \\cdot x_i + b) \\ge 1 \\space,\\space i = 1,2,\\dots n\n",
    "\\end{array}\n",
    "$$"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7c86c366-389b-4ce5-a599-9826bcad4c5f",
   "metadata": {},
   "source": [
    "# sum"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "76927818-ca55-4347-b80f-e0da2e33da9e",
   "metadata": {},
   "source": [
    "$$\n",
    "    r_j = \\frac{\\displaystyle\\sum_{\\substack{i=1 \\\\ \\hat y^{(i)} \\ne y_j^{(i)}}}^{m}{w^{(i)}}}{\\displaystyle\\sum_{i=1}^{m}{w^{(i)}}}\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c96ab562-5d69-4a9b-b035-5382a6d28d57",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b52c28e3-5202-4536-8647-42b17d94558a",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.datasets import load_iris\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "X, y = load_iris(return_X_y=True)\n",
    "x_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3ce3a189-35bd-42be-9d13-3b8fb46580cd",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "python3.6",
   "language": "python",
   "name": "python3.6"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
